home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / time_in.arc / TIME_IN.DOC < prev    next >
Text File  |  1989-10-29  |  1KB  |  38 lines

  1.                              Time_In
  2.                                1.0
  3.                      (c) 1989 John W. Wulff
  4.  
  5. Time_In is designed to allow the user to run a program based on a
  6. configured time limit.  These time periods are entered on the
  7. command line with the lower and upper limits separated with a
  8. hyphen and each period separated by a space.  Up to 10 time
  9. periods can be tested.  The hours and minutes must be separated
  10. by a colon.  For example:
  11.  
  12.        Time_In 03:00-04:00 11:10-12:00 15:00-15:30 21:10-23:00
  13.  
  14. Time_In will set an ErrorLevel which can be tested in a batch
  15. file.  If the current time is NOT within any of the time periods,
  16. the ErrorLevel will be 0.  If the current time IS within one of
  17. the periods the program will return an ErrorLevel of 1.  If NO
  18. time parameters are entered on the command line, then Time_In
  19. will return a 2.  The following example represents a batch file
  20. for testing these ErrorLevels.
  21.  
  22.     Time_In 04:00-05:00 10:00-12:30
  23.      if errorlevel 1 DoSomething
  24.      if errorlevel 2 DoSomethingElse
  25.  
  26. It's suggested that your DOS manual be consulted for a full
  27. discussion of batch file commands and testing of ErrorLevels if
  28. you don't feel up to speed on this subject.
  29.  
  30. Enjoy!
  31.  
  32.     John W. Wulff
  33.     Wulff Enterprises, Inc.
  34.     260 Terranova Drive
  35.     Warrenton, VA  22186-9227
  36.     (703) 349-8805
  37.     Compuserve 71076,1255
  38.